{extend name="common/layout" /}
{block name="main"}
<div class="admin-main layui-anim layui-anim-upbit">
    <div class="padding30">
        <h3 class="page-box-title">{:lang('System Setup')}</h3>
    </div>
    <div class="layui-form-box">
    <form class="layui-form ">
        <input type="hidden" name="logo" id="logo" value="{$system.logo}">
        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('Website Name')}</label>
            <div class="layui-input-6">
                <input type="text"name="name" value="{$system.name}" lay-verify="required" placeholder="{:lang('Website Name')}" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('Website Url')}</label>
            <div class="layui-input-6">
                <input type="text" name="url" value="{$system.url}" lay-verify="url" placeholder="{:lang('Website Url')}" class="layui-input">
            </div>
        </div>
       
       
        <!-- <div class="layui-form-item">
            <label class="layui-form-label">{:lang('Copyright')}</label>
            <div class="layui-input-3">
                <input type="text" name="copyright" value="{$system.copyright}" placeholder="{:lang('Copyright')}" class="layui-input">
            </div>
        </div> -->
        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('Company Address')}</label>
            <div class="layui-input-6">
                <input type="text" name="ads" value="{$system.ads}" placeholder="{:lang('Company Address')}}" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('tel')}</label>
            <div class="layui-input-6">
                <input type="text" name="tel" value="{$system.tel}" placeholder="{:lang('tel')}" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('Email')}</label>
            <div class="layui-input-6">
                <input type="text" name="email" value="{$system.email}" placeholder="{:lang('Email')}" class="layui-input">
            </div>
        </div>
        <br/>
        <br/>
        <div class="layui-form-item">
            <label class="layui-form-label layui-form-label-no"></label>
            <div class="layui-input-6 pleft22">
                <button type="button" class="layui-btn" lay-submit="" lay-filter="sys">{:lang('submit')}</button>
            </div>
            
        </div>
        
    </form>
</div>
</div>
{/block}
{block name="footer"}
<script>
    layui.use(['form', 'layer','upload'], function () {
        var form = layui.form,layer = layui.layer,upload = layui.upload,$ = layui.jquery;
        
        
        //提交监听
        form.on('submit(sys)', function (data) {
            loading =layer.load(1, {shade: [0.1,'#fff']});
            $.post("{:url('system/system')}",data.field,function(res){
                layer.close(loading);
                if(res.code > 0){
                    layer.msg(res.msg,{icon: 1, time: 1000},function(){
                        location.href = res.url;
                    });
                }else{
                    layer.msg(res.msg,{icon: 2, time: 1000});
                }
            });
        })
    })
</script>
{/block}